package cn.sumpu.app.guoguojie.dao;

import java.util.List;
import java.util.Map;

import cn.sumpu.app.guoguojie.domain.Friend;
import cn.sumpu.app.guoguojie.domain.FriendGroup;
import cn.sumpu.app.guoguojie.domain.Group;
import cn.sumpu.app.guoguojie.domain.Ext.FriendExt;
import cn.sumpu.app.guoguojie.domain.Ext.FriendFamily;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;

public interface FriendDao {
	
	public FriendFamily searchFriendEmail(Map<String,Object> map)throws AppBusinessException;
	
	public FriendFamily searchFriendDoorplate(Map<String,Object> map)throws AppBusinessException;
	
	//根据标签名称查找好友
	public List<FriendFamily> searchFriendByTag(Map<String,Object> map)throws AppBusinessException;
	
	//根据标签查找的总记录数
	public Integer searchFriendByTagCount(Map<String,Object> map)throws AppBusinessException;
	
	public List<FriendFamily> searchFriendCondition(Map<String, Object> map)throws AppBusinessException;
	
	public int searchFriendConditionCount(Map<String, Object> map)throws AppBusinessException;
	
	public void insertFriend(Friend friend)throws AppBusinessException;
	
	public void agreeFriend(Map<String,Object> map)throws AppBusinessException;
	
	public void updateFriend(Map<String,Object> map)throws AppBusinessException;
	
	public void deleteFriend(Map<String,Object> map)throws AppBusinessException;
	
	public void insertGroup(Group group)throws AppBusinessException;
	
	public void updateGroup(Group group)throws AppBusinessException;
	
	public void deleteGroup(String identifier)throws AppBusinessException;
	
	public void insertFriendGroup(FriendGroup friendGroup)throws AppBusinessException;
	
	public void deleteFriendGroup(Map<String,Object> map)throws AppBusinessException;
	
	public void updateFriendGroup(Map<String,Object> map)throws AppBusinessException;
	
	
	public List<Group> getGroupList(Map<String,Object> map)throws AppBusinessException;
	
	public List<FriendFamily> maybeFriends(Map<String,Object> map)throws AppBusinessException;
	
	public int maybeFriendsCount(Map<String,Object> map)throws AppBusinessException;
	
	
		
	public List<FriendFamily> getMyFriendsFamily(Map<String,Object> map)throws AppBusinessException;
	
	public int getMyFriendsFamilyCount(Map<String,Object> map)throws AppBusinessException;
	
	public List<FriendExt> getFamilyMember(Map<String,Object> map)throws AppBusinessException;
	
	public List<Friend> getFriend(Map<String,Object> map)throws AppBusinessException;
	
	/**
	 * 更新朋友分组到默认分组
	 * @param map
	 * @throws AppBusinessException
	 */
	public void updateFriendGroupDef(Map<String,Object> map)throws AppBusinessException;
	
	/**
	 * 查看俩家是否是好友
	 * @param myDoorplate		自己家的门牌号
	 * @param friendDoorplate	好友家的门牌号
	 * @return					0（不是好友）或1（是好友）
	 * @throws AppBusinessException
	 */
	public Integer getFriendByFamily(Map<String,Object> map)throws AppBusinessException;
	
}
